#include <Windows.h>
#include "winsys.h"
#include "window/framewin.h"

HINSTANCE g_hInstance;


int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdParam, int nCmdShow)
{
	g_hInstance=hInstance;

	//init dlls.
	HMODULE hRichedit = LoadLibrary(TEXT("SciLexer.dll"));
	if(hRichedit == NULL) {
		MessageBox(NULL, TEXT("SciLexer.dll needed!"), NULL, MB_OK);
		return -1;
	}

	//create window & message loop
	CFrameWindow* win = new CFrameWindow;

	MSG Message;
	while(GetMessage(&Message,0,0,0)) {
		TranslateMessage(&Message);
		DispatchMessage(&Message);
	}

	//fin
	delete win;
	return Message.wParam;
}
